<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>
        function quc(arr)
        {
            var newArr=[]
            for(var i=0;i<arr.length;i++)
            {
                if(newArr.indexOf(arr[i])==-1)
                {
                    // newArr.push(arr[i])
                    newArr[newArr.length]=arr[i]
                }
            }
            return newArr
        }
        var a=quc([1,2,3,2,3,5,6])
        console.log(a);
    </script>
    
</body>
</html>